import type { Lesson, LessonStudent } from './lesson'
import http from '@/utils/http'

export interface ScheduleLessonLegacy extends LessonStudent {
  lesson: Lesson
  campusName: string
  classroomName: string
  className: string
}

export interface ScheduleLesson extends Lesson {
  lessonStudent: LessonStudent
  className: string
  campusName: string
  classroomName: string
  leadTeacherName: string
}

export interface ScheduleLessonQuery {
  lessonDateFrom: string
  lessonDateTo: string
  studentId: string
}

// Deprecated
// 查询排课课次列表
export function getScheduleLessonListLegacy(query: ScheduleLessonQuery) {
  return http.get<ScheduleLesson[]>(`/p/schedule/lesson/list`, query)
}

// 查询排课课次列表
export function getScheduleLessonList(query: ScheduleLessonQuery) {
  return http.get<ScheduleLesson[]>(`/p/schedule/lesson/query`, query)
}
